for i in range(0, 7):
    for k in range(0, 6 - i):
        print("  ", end=" ")
    for j in range(-i, i + 1):
        num = 2 ** abs(abs(j) - i)
        print("%-2d" % (num), end=" ")
    print()
